package com.ed100.sass.patter.proxy.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ProxyObject implements InvocationHandler {

	Object obj;
	
	public ProxyObject() {

	}
	
	public ProxyObject(Object obj) {
		this.obj = obj;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("代理类执行");
		return method.invoke(obj, args);
	}

}
